<template>
  <!-- <link>ad</link> -->
  <div class="app-container">
  <el-button icon="el-icon-document" type="primary" round=true link="true" @click="showLock"> 跳转文档</el-button>
  <el-button icon="el-icon-document" type="primary" round=true link="true" @click="secKill"> 点击秒杀</el-button>
  <el-button icon="el-icon-document" type="primary" round=true link="true" @click="clearCardHistory"> 一键清空卡牌背包历史以及排行榜信息</el-button>
  <el-button icon="el-icon-document" type="primary" round=true link="true" @click="secKill1"> 点击跳转</el-button>
  <!-- <iframe :src="src" width="100%" height="100%" /> -->
</div>
  <!-- href="file:///C:/Users/Haotian/Desktop/%E5%9C%A8%E5%AD%A6/%E5%BD%BB%E5%BA%95%E7%90%86%E8%A7%A3Java%E4%B8%AD%E7%9A%84%E5%90%84%E7%A7%8D%E9%94%81-%E5%9B%BE%E7%81%B5%E8%AF%BE%E5%A0%82.pdf">iamlqq</el-button> -->
</template>

<script>
//import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/zone/myzone";
import {secKill,clearCardHistory} from "@/api/zone/myzone";

export default {
  name: "myzone",
  // dicts: ['sys_notice_status', 'sys_notice_type'],
  data() {
    return {
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        noticeTitle: undefined,
        createBy: undefined,
        status: undefined
      },
      // 表单参数
      form: {},
      // 表单校验
      src:this.url
    };
  },
  // created() {
  //   this.getList();
  // },
  methods: {
    /** 查询展示锁这篇文档 */
    showLock() {
      window.open("/lqq/profile/pdf/设计模式之禅.pdf");
    },
    clearCardHistory(){
      clearCardHistory().then(res => {
        this.$message.success(res.msg);
      })
    },
    secKill(){
      secKill(1).then(res => {
          if(res.code == 200){
            this.$message.success(res.msg);
            //alert(res.msg);
          }
          this.$message.warn("活动太火爆了，请再试一次");
      });
    },
    secKill1(){
      window.open("http://127.0.0.1:8080/gateway/main/list?id=6&modelToken=admin654");
    },
    /** 提交按钮 */
    submitForm: function() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.noticeId != undefined) {
            updateNotice(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addNotice(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const noticeIds = row.noticeId || this.ids
      this.$modal.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项？').then(function() {
        return delNotice(noticeIds);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    }
  }
};
</script>
